﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

namespace LitTools
{
    /// <summary>
    /// 后选过滤器
    /// 仅第x后的结果通过
    /// </summary>
    public class NextNumFilter : IRaycastResultFilter
    {
        public int numCount;
        public List<RaycastResult> FiltRaycastResults(List<RaycastResult> result)
        {
            var targets = new List<RaycastResult>();
            for (int i = numCount; i < result.Count; i++)
            {
                targets.Add(result[i]);
            }
            return targets;
        }
    }
}
